<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>WEB打印控件LODOP的样例三十七:打印公章效果图</title>
<script language="javascript" src="LodopFuncs.js"></script>
</head>
<body>
<iframe src="http://help.lodop.net:8100/k_hlp?type=url&fid=CA" width="500" height="46" frameborder="0" scrolling="no" style="float:right;background:inherit;"></iframe>
<h2><font color="#009999">演示打印公章效果图：</font></h2>
<p>&nbsp;&nbsp;&nbsp; 通常用浏览器打印公章都是把图片z-index设为负值来实现，本质是公章变为背景图，</p>    
<p>但进入<a href="javascript:myPreview1()">打印预览</a>看看，Lodop对右图通过增设transcolor属性实现了“先字后章”效果。</p>
<p>结合样例25，带水印的公章文件效果，进入<a href="javascript:myPreview2()">打印预览2</a></p>
<div id="div1">  
<table border="1" width="611" style="border-collapse: collapse" bordercolor="#000000">
  <tbody><tr>
    <td width="100%" colspan="2" height="16">
      <p align="center">证明函</p></td>
  </tr>
  <tr>
    <td width="100%" height="35" colspan="2">&nbsp; 事宜：兹证明郭德强先生在本部门的所有借款全部还清。2011年1月6日。</td>   
  </tr>
  <tr>
    <td width="45%" height="156">&nbsp;&nbsp;
      <p>财务部门名称（盖章）：</p>
      <p>集团公司金融投资管理部</p>
      <p>　</p>
    </td>
    <td width="55%" height="156">　
      <p>所在单位名称（盖章）：</p>
      <p>集团公司第二销售分公司</p>  
      <p>　</p></td>
  </tr>
</tbody></table>
<img border="0" src="http://www.lodop.net/demolist/PrintSample37.png"
style="z-index: -1; position: absolute; left:100px; top:200px;">
<img border="0" transcolor="#FFFFFF" src="http://www.lodop.net/demolist/PrintSample37.png"
style="z-index: -1; position: absolute; left:350px; top:200px;">
</div>

<p>注意要实现右边的“后盖章”效果,需要图片透色部分要纯正(整白),最好是PNG格式。</p>

<p><a href="https://www.lodop.net/LodopDemo.html">&lt;&lt;回样例目录</a></p>

<script language="javascript" type="text/javascript"> 
	var LODOP; //声明为全局变量 
	function myPreview1() {		
		LODOP=getLodop(); 		
		LODOP.PRINT_INIT("打印插件功能演示_Lodop功能_打印公章");	
	 	LODOP.ADD_PRINT_HTM(0,0,"100%","100%",document.documentElement.innerHTML);
		LODOP.PREVIEW();	
	};		
	function myPreview2() {		
		LODOP=getLodop(); 		
		LODOP.PRINT_INIT("打印插件功能演示_Lodop功能_打印公章加水印效果");	
		//水印效果begin----
		LODOP.ADD_PRINT_TEXT(13,22,295,160,"秘密文件");
		LODOP.SET_PRINT_STYLEA(0,"FontSize",20);
		LODOP.SET_PRINT_STYLEA(0,"FontColor","#EEC591");
		LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
		LODOP.SET_PRINT_STYLEA(0,"Angle",50);
		LODOP.SET_PRINT_STYLEA(0,"Repeat",true);
		//水印效果end-----
		LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", "URL:PrintSample37.html");
		LODOP.PREVIEW();	
	};				
</script> 




</body></html>
